package com.gxgeek.entity;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author gaoxing
 * @create 2018-06-04 下午4:17
 */
@Table(name = "data_record")
@Entity
@Data
@IdClass(DataRecordEntity.DataRecordKey.class)
public class DataRecordEntity implements Serializable {
    @Id
    private String snapshotId;
    @Id
    private String userId;
    private String type;
    private Date createdAt;

    @Data
    public static class DataRecordKey implements Serializable{
        private String snapshotId;
        private String userId;

    }
}
